package com.xiashitech.agent.instrumentation.undertow.handler.inst;

import com.google.auto.service.AutoService;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;

import java.util.Arrays;
import java.util.List;

import static java.util.Arrays.asList;


@AutoService(InstrumentationModule.class)
public class XSHandlerInstrumentationModule extends InstrumentationModule {

    public XSHandlerInstrumentationModule() {
        super("XS-Undertow");
    }

    @Override
    public List<TypeInstrumentation> typeInstrumentations() {
        return asList(new XSHandlerInstrumentation());
    }

    public List<String> getAdditionalHelperClassNames() {
        return Arrays.asList(
                "com.xiashitech.agent.instrumentation.undertow.common.UndertowResponseSetter",
                "com.xiashitech.agent.instrumentation.helper.calldepth.XSUndertowHandlerCallDepth"
        );
    }
}
